<?php
/**
 * Created by PhpStorm.
 * User: yyq
 * Date: 2017/3/27
 * Time: 14:22
 */

namespace Wap\Controller;


use Information\Model\InformationModel;
use Information\Model\LectureModel;
use Think\Controller;

class InformationController extends Controller
{
    private $information_model;
    private $lecture_model;

    public function __construct()
    {
        parent::__construct();
        $this->information_model = new InformationModel();
        $this->lecture_model = new LectureModel();
    }

    /**
     * 信息详情
     */
    public function infoDetails() {
        $id = I('get.id');//dump($id);exit;
//        dump(sp_get_host());
        $info = $this->information_model->where(['id' => $id])->find();

        $this->assign('content', $info['content']);
        $this->display();
    }

    /**
     * 讲座详情
     */
    public function lectureDetails() {
        $id = I('get.id');//dump($id);exit;
//        dump(sp_get_host());
        $info = $this->lecture_model->where(['id' => $id])->find();

        $this->assign('content', $info['content']);
        $this->display();
    }
}